﻿using System;
using System.Collections.Generic;
using T.FAS.Runtime.Base.Entity;

namespace T.FAS.Runtime.Base.SGSPI
{
    public interface IQueryPlanService
    {
        /// <summary>
        /// 获取查询方案列表
        /// </summary>
        /// <returns></returns>
        List<QueryPlan> GetQueryPlanList(string pageID, string DQID);
        /// <summary>
        /// 创建或更新
        /// </summary>
        /// <param name="queryPlan"></param>
        Dictionary<string, string> CreateOrUpdateQueryPlan(QueryPlan queryPlan);
        /// <summary>
        /// 获取查询方案列表
        /// </summary>
        /// <returns></returns>
        List<QueryPlan> GetQueryPlanListV2(QueryPlanFilter queryPlanFilter);
        /// <summary>
        /// 获取查询方案列表不带明细
        /// </summary>
        /// <returns></returns>
        List<QueryPlan> GetQueryPlanListV3(QueryPlanFilter queryPlanFilter);
        /// <summary>
        /// 根据ID查询方案
        /// </summary>
        /// <param name="planId"></param>
        /// <returns></returns>
        QueryPlan GetQueryPlanV2(string planId);
        /// <summary>
        /// 创建或更新
        /// </summary>
        /// <param name="queryPlan"></param>
        Dictionary<string, string> CreateOrUpdateQueryPlanV2(QueryPlan queryPlan);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        Dictionary<string, string> DeleteQueryPlan(string id);
        /// <summary>
        /// 保存查询方案列表
        /// </summary>
        Dictionary<string, string> SaveQueryPlans(List<QueryPlan> queryPlans);
        /// <summary>
        /// 置顶
        /// </summary>
        /// <param name="planID"></param>
        /// <param name="topType">0置顶 1取消置顶</param>
        /// <returns></returns>
        Dictionary<string, string> TopQueryPlan(string planID, int topType);
        /// <summary>
        /// 分享
        /// </summary>
        Dictionary<string, string> ShareQueryPlan(QueryPlan queryPlan, List<QueryPlan> shareUsers);
        /// <summary>
        /// 修改方案
        /// </summary>
        /// <returns></returns>
        Dictionary<string, string> UpdateQueryPlan(string planID, Dictionary<string, object> param);
        /// <summary>
        /// 加入共享方案
        /// </summary>
        /// <param name="queryPlan"></param>
        /// <param name="shareUsers"></param>
        /// <returns></returns>
        Dictionary<string, string> JoinQueryPlan(QueryPlan queryPlan, List<QueryPlan> shareUsers);
    }
}
